<%--
  Created by IntelliJ IDEA.
  User: zr
  Date: 2024/12/19
  Time: 15:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>注册</title>
    <link rel="stylesheet" type="text/css" href="/css/register.css">
</head>
<body>
<c:if test="${not empty error}">
    <div class="error-message">${error}</div>
</c:if>
<div class="register-container">
    <h2>注册</h2>
    <form action="/userinfo/register" method="post">
        <input type="text" name="name" placeholder="用户名" required>
        <input type="password" name="password" placeholder="密码" required>
        <label for="userAge">年龄:</label>
        <input type="number" name="userAge" id="userAge" min="1" placeholder="年龄" required>
        <label for="userSex">性别:</label>
        <select name="userSex" id="userSex" required>
            <option value="">请选择</option>
            <option value="男">男</option>
            <option value="女">女</option>
        </select>

        <label for="rid">角色ID:</label>
        <select name="rid" id="rid" required>
            <option value="">请选择</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
        </select>

        <input type="submit" value="注册">
    </form>
    <div class="login-link">
        <a href="/userinfo/login">已有账号？登录</a>
    </div>
</div>
</body>
</html>
